<?php $dulieupk = $phongkham[0]; ?>
<script src="<?php echo base_url();?>/template/js/jquery.infieldlabel.min.js" type="text/javascript" charset="utf-8"></script>

<script type="text/javascript">
	$(document).ready(function(){
		$(".tabpkContents").hide();
		$(".active").show();
		$("li.pk").click(function(){
			var activeTab = $(this).attr("name"); 
			$("li.pk").removeClass("active"); 
			$(this).addClass("active"); 
			$(".tabpkContents").hide(); 
			$(activeTab).fadeIn();
		});
        $("ul#chpk li").click(function(){
			var $idch = $(this).attr("id");
            $("ul#chpk li").removeClass();
            $(this).addClass('active');
            $.ajax({
                url: "http://localhost/phongkhamuytin/mod_phongkham/mod_phongkham/introch",
                type: "POST",
                data:"idch="+$idch,
                success: function(data){
                    $("#introch").html(data);
                }
            });
               
		});
<<<<<<< .mine
        
        
        $('#sm').click(function() {
            var name=$("#name").val();
            var address=$("#address").val();
            var email=$("#email").val();
            var phone=$("#fone").val();
            var noidung=$("#noidung").val();
            
            var dataarr = new array[name,address,email,phone,noidung];
            $.ajax({
                url: "http://localhost/phongkhamuytin/mod_phongkham/mod_phongkham/xulyform",
                type: "POST",
                data: dataarr,
                cache: false,
                success: function(html){
                    $(".error").html(html);
                }
            });
             // return false;
            });
        
=======
>>>>>>> .r119
        initialize();
	});
    
</script>


<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false&language=vi"></script>
<script type="text/javascript">
var map;
function initialize() {
      var myLatlng = new google.maps.LatLng(<?php echo $dulieupk->map ?>);
      var myOptions = {
    zoom: 16,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
}
map = new google.maps.Map(document.getElementById("bandopk"), myOptions); 
  // Biến text chứa nội dung sẽ được hiển thị
var text;
text= "<div class='bdtext'><?php echo $dulieupk->title; ?></div><br />" + 
     "<div class='bdimage'><img src='<?php echo base_url().$dulieupk->logo; ?>'  /></div>";
   var infowindow = new google.maps.InfoWindow(
    { content: text,
        size: new google.maps.Size(100,50),
        position: myLatlng
    });
       infowindow.open(map);    
    var marker = new google.maps.Marker({
      position: myLatlng, 
      map: map,
      title:"<?php echo $dulieupk->title; ?>"
  });
}
</script>

<div id="mod_phongkham">
	<div class="module-title">
        <h3 class="title-phongkham"><?php echo $dulieupk->title ?></h3>
	</div>
	<div class="module-content">
    <div class="module-content-inner clear">
        <div class="fLeft">
            <div class="thongtin">
                <ul>
                    <?php 
                    $add = !empty($dulieupk->address)?$dulieupk->address:'';
                    $ema = !empty($dulieupk->email)?$dulieupk->email:'';
                    $web = !empty($dulieupk->website)?$dulieupk->website:'';
                    $hit = !empty($dulieupk->hits)?$dulieupk->hits:'';
                    $like = !empty($like)?$like:'';
                    
                        echo '<li class="address">Địa chỉ: '.$add.'</li>';
                    if (!empty($dulieupk->phone) && !empty($dulieupk->fax))
                        echo '<li class="phone"><p style="margin: 0;">Điện thoại: '.$dulieupk->phone.'&nbsp;&nbsp;&nbsp;Fax: '.$dulieupk->fax.'</p></li>';
                    else if (!empty($dulieupk->phone))
                        echo '<li class="phone"><p style="margin: 0;">Điện thoại: '.$dulieupk->phone.'</p></li>';
                    else if (!empty($dulieupk->fax))
                        echo '<li class="phone"><p style="margin: 0;">Điện thoại: '.$dulieupk->fax.'</p></li>';
                    else {}
                    
                        echo '<li class="email">Email: '.$ema.'</li>';
                        echo '<li class="website">Website: '.$web.'</li>';
                        echo '<li class="hit">Lượt xem: '.$hit.'</li>';
                        echo '<li class="like">Thích: '.$like .'</li>';
                    ?>

                </ul>
            </div>
            <div class="menupk">
                <ul>
                    <li class="gt pk <?php echo $pkpage=='gt'?'active':null; ?>" name="#pkgioithieu">Giới thiệu</li>
                    <li class="hd pk <?php echo $pkpage=='hd'?'active':null; ?>" name="#pkhoidap">Hỏi đáp</li>
                </ul>
            </div>
        </div>
        <div class="fRight">
            <div class="videopk">
               <object width="258" height="240"><param name="movie" value="<?php echo 'http://www.youtube.com/v/'.$dulieupk->video; ?>?version=3&amp;hl=vi_VN"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="<?php echo 'http://www.youtube.com/v/'.$dulieupk->video; ?>?version=3&amp;hl=vi_VN" type="application/x-shockwave-flash" width="258" height="240" allowscriptaccess="always" allowfullscreen="true"></embed></object>
            </div>
        </div>
        
        <div id= "pkgioithieu" class="tabpkContents <?php echo $pkpage=='gt'?'active':null; ?>">
            <div class="pkinner">
                <?php echo $dulieupk->fulltext ?>
                 <div class="bando">
                    <div class="title"> Bản Đồ </div>
                    <div id="bandopk" style="height:400px; width:660px">&nbsp;</div>
                </div>
            </div>
           
            
        </div>
        
        <div id= "pkhoidap" class="tabpkContents <?php echo $pkpage=='hd'?'active':null; ?>">
            <div class="pkinner">
            
                <div class="cauhoipk fLeft">
                <?php if(!empty($cauhoi)):?>
                    <div class="title">
                        <h3>Những câu hỏi được gửi cho phòng khám</h3>
                    </div>
                    <div class="content">
                        <ul id="chpk">
                           <?php 
                           $i = 0;
                           
                           foreach($cauhoi as $cauhoi1){
                            $class = ($i==0)?"active":"";
                            echo '<li id="'.$cauhoi1->id.'" class="'.$class.'"><p>'.$cauhoi1->introtext.'</p></li>';
                            $i++;
                           }
                               
                           ?>
                        </ul>
                    </div>
                    <div class="bottom">
                         <p style="font-weight:bold; color: #00f">phan trang</p>
                    </div>
                <?php endif;?>
                </div>
            
                
                <div class="cauhoipk fRight">
                    <div class="title">
                        <h3>Những câu hỏi được gửi cho phòng khám</h3>
                    </div>
                    <div class="content">
                        <ul>
                           <li>dsfgdsf</li>
                            <li>dsfgdsf</li>
                            <li>dsfgdsf</li>
                            <li>dsfgdsf</li>
                        </ul>
                    </div>
                    <div class="bottom">
                        <p style="font-weight:bold; color: #00f">phan trang</p>
                    </div>
                </div>
                <div id="introch">
                <?php echo $introch; ?>
                </div>
                
            </div>
        </div>

	</div>
	</div>
	
</div>